941225:
 ~~~~~~~
	* Finished the C version of the test program. Started to fix all
	  bugs in it (more than in the first version of the assembly language
	  test program).

	* Spent the rest of this day to find a weird bug that made the
	  hotkeys stop repeating after that they had repeated 4 times.

	  Found the bug when I started MemSnapII and saw that the program
	  allocated around 1k memory every second. The ListView gadget sets
	  the IDCMP_INTUITICKS flag (it's in LISTVIEWIDCMP) and the program
	  got a message every 1/50s. I did use the wrong ROM routine to
	  reply the message: ReplyMsg instead of GU/GT_ReplyIMsg.

	  Weird that I didn't notice this 7 hours earlier... (the error was
	  on the last line in the C source code except for all lines with a
	  lot of ([}{]) chars that is used in C).

	* Wrote two small assembly language routines to change the LED (sound
	  filter) directly from a function call in C.

	* It seems that C-compilers can't read a longword from two words right
	  after each other in a structure. It could be done in a complicated
	  way that should work with all C-compilers.

	  long coords;
	  coords = (LONG)imsg->MouseX << 16 | imsg->MouseY;

	  corresponds to this code in assembler (if imsg is in A0 and the
	  coords should be saved in D0):

	  moveq.l #0,d0			; coords = 0
	  move.w  im_MouseX(a0),d0	; coords = MouseX
	  lsl.l	  #16,d0		; << 16
	  or.w	  im_MouseY(a0),d0	; | MouseY

	  or a bit optimized:

	  move.w  im_MouseX(a0),d0	; coords = MouseX
	  swap	  d0			; x coord in the high word
	  move.w  im_MouseY(a0),d0	; y coord in the low word

	  or fully optimized:

	  move.l  im_MouseX(a0),d0	; X coord in high, Y coord in the low


[Main] [Previous] [Next]

Converted on 19 Jul 1996 with RexxDoesAmigaGuide2HTML by Michael Ranner.